<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<html>
<head>
	<title>参数配置管理</title>
	<meta name="decorator" content="default"/>
	<script type="text/javascript">
		$(document).ready(function() {
			
		});
		function page(n,s){
			$("#pageNo").val(n);
			$("#pageSize").val(s);
			$("#searchForm").submit();
        	return false;
        }
	</script>
</head>
<body>
	<ul class="nav nav-tabs">
		<li class="active"><a href="${ctx}/sysparams/sysParams/">参数配置列表</a></li>
		<%-- <shiro:hasPermission name="sysparams:sysParams:edit">
			<li><a href="${ctx}/sysparams/sysParams/form?paramCode=1">平台收益参数配置</a></li>
			<li><a href="${ctx}/sysparams/sysParams/form?paramCode=2">试算参数配置</a></li>
			<li><a href="${ctx}/sysparams/sysParams/form?paramCode=0">普通参数配置</a></li>
		</shiro:hasPermission> --%>
	</ul>
	<form:form id="searchForm" modelAttribute="sysParams" action="${ctx}/sysparams/sysParams/" method="post" class="breadcrumb form-search">
		<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
		<input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
		<%-- <ul class="ul-form">
			<li><label>参数类型：</label>
				<form:select path="paramType" class="input-medium">
					<form:option value="" label=""/>
					<form:options items="${fns:getDictList('')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
				</form:select>
				<label>参数值：</label>
				<form:input path="paramValue" htmlEscape="false" maxlength="100" class="input-medium"/>
			</li>
			<li class="btns"><input id="btnSubmit" class="btn btn-primary" type="submit" value="查询"/></li>
			<li class="clearfix"></li>
		</ul> --%>
	</form:form>
	<sys:message content="${message}"/>
	<table id="contentTable" class="table table-striped table-bordered table-condensed">
		<thead>
			<tr>
				<th>参数类型</th>
				<th>平台收益类型</th>
				<!-- <th>类型所属选择</th>
				<th>类型分配角色</th> -->
				<th>参数名</th>
				<th>参数值</th>
				<th>描述</th>
				<th>创建日期</th>
				<shiro:hasPermission name="sysparams:sysParams:edit"><th>操作</th></shiro:hasPermission>
			</tr>
		</thead>
		<tbody>
		<c:forEach items="${page.list}" var="sysParams">
			<tr>
				<td>
					<c:if test="${sysParams.paramCode == '0' }">普通</c:if>
					<c:if test="${sysParams.paramCode == '1' }">平台收益</c:if>
					<c:if test="${sysParams.paramCode == '2' }">试算</c:if>
					<c:if test="${sysParams.paramCode == '3' }">质保金</c:if>
				</td>
				<td>
					<%-- <a href="${ctx}/sysparams/sysParams/form?id=${sysParams.id}&paramCode=${sysParams.paramCode}">
						${fns:getDictLabel(sysParams.paramType, 'platform_pumping', '')}
					</a> --%>
					${fns:getDictLabel(sysParams.paramType, 'platform_pumping', '')}
				</td>
				<%-- <td>
					${fns:getDictLabel(sysParams.paramCode, 'work_order_type', '')}
				</td>
				<td>
					<c:forEach items="${allRoles }" var="role">
						<c:if test="${role.id == sysParams.paramName }">${role.name }</c:if>
					</c:forEach>
				</td> --%>
				<td>
					<%-- <a href="${ctx}/sysparams/sysParams/form?id=${sysParams.id}&paramCode=${sysParams.paramCode}">
						${sysParams.paramName}
					</a> --%>
					${sysParams.paramName}
				</td>
				<td>
					${sysParams.paramValue}
				</td>
				<td>
					${sysParams.remarks}
				</td>
				<td>
					<fmt:formatDate value="${sysParams.createDate}" pattern="yyyy-MM-dd HH:mm:ss"/>
				</td>
				<shiro:hasPermission name="sysparams:sysParams:edit"><td>
    				<a href="${ctx}/sysparams/sysParams/form?id=${sysParams.id}&paramCode=${sysParams.paramCode}">修改</a>
					<%-- <a href="${ctx}/sysparams/sysParams/delete?id=${sysParams.id}" onclick="return confirmx('确认要删除该参数配置吗？', this.href)">删除</a> --%>
				</td></shiro:hasPermission>
			</tr>
		</c:forEach>
		</tbody>
	</table>
	<div class="pagination">${page}</div>
</body>
</html>